import { createRequestTypes } from '@UTILS/reduxHelper'

export const GET_MED_RECORD = createRequestTypes('GET_MED_RECORD')
export const CHANGE_MED_RECORD_STATUS = createRequestTypes('CHANGE_MED_RECORD_STATUS')
export const SET_MED_RECORD_FIELD = createRequestTypes('SET_MED_RECORD_FIELD')

export default {
  dispatchGetMedRecord(payload, params) {
    return {
      type: GET_MED_RECORD.REQUEST,
      payload,
      params
    }
  },
  dispatchChangeMedRecordStatus(item) {
    return {
      type: CHANGE_MED_RECORD_STATUS.REQUEST,
      item
    }
  },
  dispatchSetMedRecordField(field) {
    return {
      type: SET_MED_RECORD_FIELD.REQUEST,
      field
    }
  },
}
